/*
 * Copyright (c) 2011 Jean-Marc Perronne
 * Ensisa, 12 rue des Freres Lumieres, F-68093 Mulhouse cedex
 * All rights reserved.
 *
 * The copyright of this software is owned by Werner Randelshofer. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Jean-Marc Perronne. For details see accompanying license terms. 
 */

package fr.uha.ensisa.jmp.ui.mvc;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;

public class Controller<M> implements MouseListener, MouseMotionListener, MouseWheelListener, KeyListener
{
    public static final int LEFT_MOUSE_BUTTON   = MouseEvent.BUTTON1_MASK;
    public static final int MIDDLE_MOUSE_BUTTON = MouseEvent.BUTTON2_MASK;
    public static final int RIGHT_MOUSE_BUTTON  = MouseEvent.BUTTON3_MASK;
 
    private M model;
	private View<M> view;
		
	public Controller(M newModel)
	{
		this.model = newModel;
		this.view = null;
	}
	
	public void view(View<M> view)
	{
		this.view = view;
	}
	
	final public View<M>view()
	{
		return this.view;
	}
	
	public void model(M model)
	{
		this.model = model;
	}
	
	public M model()
	{
		return this.model;
	}
		
	public void mousePressed(MouseEvent e)
	{
	}

	public void mouseReleased(MouseEvent e)
	{
	}

	public void mouseClicked(MouseEvent e)
	{
	}
	
	public void mouseEntered(MouseEvent e)
	{
	}

	public void mouseExited(MouseEvent e)
	{
	}
	
	public void mouseMoved(MouseEvent e)
	{
	}
	
	public void mouseDragged(MouseEvent e)
	{
	}
	
	public void keyTyped(KeyEvent e)
	{
	}
	
	public void keyPressed(KeyEvent e)
	{
	}

	public void keyReleased(KeyEvent e)
	{
	}

	public void mouseWheelMoved(MouseWheelEvent e)
	{	
	}
}
